package com.example.openfeignserver;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author WuGang
 * @Date 2022/11/14 9:37
 * @Version 1.0
 */
@RestController
@RequestMapping("/openfeign")
// 单独写一个不带web的接口程序运行一遍就停了而且没有端口号，这种只限于本服务中controllers调service
public class A {
    @GetMapping("/server/test")
    @ResponseBody  //不加这个openfeign能调用吗
//    测试通过，本身自带负载均衡，无需加其他负载均衡组件和依赖
    public String test() {
        return "opengfeignserver2-测试负载均衡";
    }
}
